package com.xuelang.pipeline.infrastructure.pipeline.converter;

import com.xuelang.pipeline.domain.pipeline.PipelineTemplate;
import com.xuelang.pipeline.infrastructure.pipeline.dataobject.PipelineTemplateDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 流水线模板实体与流水线模板DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface PipelineTemplateToPipelineTemplateDOConverter {

    PipelineTemplateToPipelineTemplateDOConverter INSTANCE = Mappers.getMapper(PipelineTemplateToPipelineTemplateDOConverter.class);

    /**
     * PipelineTemplate转化为PipelineTemplateDO
     * @param pipelineTemplate
     * @return
     */
    PipelineTemplateDO pipelineTemplateToPipelineTemplateDO(PipelineTemplate pipelineTemplate);

    /**
     * PipelineTemplateDO转化为PipelineTemplate
     * @param pipelineTemplateDO
     * @return
     */
    PipelineTemplate pipelineTemplateDOToPipelineTemplate(PipelineTemplateDO pipelineTemplateDO);

}
